package com.yc.damai.web.feign;

import com.yc.damai.entity.DmProduct;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class OtherActionImpl implements OtherAction{

    // 缓存数据: 可以扩展为 Redis
    private Map<String, List<DmProduct>> cacheNewAndHot;
    public void setCacheNewAndHot(Map<String, List<DmProduct>> cacheNewAndHot) {
        this.cacheNewAndHot = cacheNewAndHot;
    }

    @Override
    public Map<String, List<DmProduct>> queryNewAndHot() {
        return cacheNewAndHot;
    }
}
